package com.sz.app.customer.api.system.dto;

import com.sz.biz.app.dto.TokenDto;
import com.sz.biz.common.customer.dto.CusUserConfigDto;
import com.sz.common.core.system.dto.FileInfoDto;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Function: TODO: ADD FUNCTION <br>
 * Author: qiankun<br>
 * Date: 2017-06-12 18:32:00
 */
public class LoginResultDto {
    private int userId;
    private int userType;
    private String tradingCurrency;
    private String accountName;

    private String fullName;

    private CusUserConfigDto cusUserConfig;

    private List<FileInfoDto> files = new ArrayList<>();

    private String token;

    private String clientId;

    private long expire;

    private Date created;

    private boolean primary;

    private String avatar;

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getUserType() {
        return userType;
    }

    public void setUserType(int userType) {
        this.userType = userType;
    }

    public String getTradingCurrency() {
        return tradingCurrency;
    }

    public void setTradingCurrency(String tradingCurrency) {
        this.tradingCurrency = tradingCurrency;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public CusUserConfigDto getCusUserConfig() {
        return cusUserConfig;
    }

    public void setCusUserConfig(CusUserConfigDto cusUserConfig) {
        this.cusUserConfig = cusUserConfig;
    }

    public List<FileInfoDto> getFiles() {
        return files;
    }

    public void setFiles(List<FileInfoDto> files) {
        this.files = files;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public long getExpire() {
        return expire;
    }

    public void setExpire(long expire) {
        this.expire = expire;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public boolean getPrimary() {
        return primary;
    }
    public void setPrimary(boolean primary) {
        this.primary = primary;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public void setCusUserSimpleDtoData(CusUserSimpleDto cusUserSimpleDto) {
        this.accountName = cusUserSimpleDto.getAccountName();
        this.userId = cusUserSimpleDto.getUserId();
        this.fullName = cusUserSimpleDto.getFullName();
        this.files = cusUserSimpleDto.getFiles();
        this.cusUserConfig = cusUserSimpleDto.getCusUserConfig();
        this.userType=cusUserSimpleDto.getUserType();
    }

    public  void setTokenDtoData(TokenDto tokenDto) {
        this.clientId = tokenDto.getClientId();
        this.created = tokenDto.getCreated();
        this.expire = tokenDto.getExpire();
        this.token = tokenDto.getToken();
        this.primary = tokenDto.getPrimary();
    }
}
